<!--<?php $reqtrack->afficheArray($_SESSION); ?>-->

<div class="index">
<h2><?php __('Liste des procédures');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
	<th><?php echo $paginator->sort('Infos', 'proc_reference');?></th>
	<!--  <th><?php echo $paginator->sort('Id', 'proc_index');?></th> -->
	<th><?php echo $paginator->sort('Référence', 'proc_reference');?></th>
	<th><?php echo $paginator->sort('Titre', 'proc_title');?></th>
	<!--<th><?php echo $paginator->sort('Scope', 'proc_scope');?></th>-->
	<!--<th><?php echo $paginator->sort('Durée', 'proc_duration');?></th>-->
	<th><?php echo $paginator->sort('Prérequis', 'proc_prerequisites');?></th>
	<th><?php echo $paginator->sort('Regression', 'proc_regression');?></th>
	<th><?php echo $paginator->sort('Type', 'proc_ptype');?></th>
	<th><?php echo $paginator->sort('Phase', 'proc_phase');?></th>
	<th><?php echo $paginator->sort('Part', 'proc_part');?></th>
	<th><?php echo $paginator->sort('Version', 'proc_version');?></th>
	<th><?php echo $paginator->sort('Catégorie', 'proc_cat');?></th>
	<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($procedures as $procedure):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo $html->link(
			'*<em style="text-align: left"><span ></span><ul type="circle"><li>- Id : '.$procedure['Procedure']['proc_index'].'</li>'.
			'<li>- Scope : '.$procedure['Procedure']['proc_scope'].'</li>'.
			'<li>- Création : '.$procedure['Procedure']['proc_created_by'].', le '.$procedure['Procedure']['proc_created_date'].'</li>'.
			'<li>- Modification : '.$procedure['Procedure']['proc_updated_by'].', le '.$procedure['Procedure']['proc_updated_date'].'</li>'.
			'</ul></em>', array('controller'=> 'procedures', 'action'=>'view', $procedure['Procedure']['proc_index']), array('class' => 'tooltip'), false, false); ?>
		</td>
		<!--  <td>
			<?php echo $procedure['Procedure']['proc_index']; ?>
		</td>-->
		<td>
			<?php echo $procedure['Procedure']['proc_reference']; ?>
		</td>
		<td>
			<?php echo $procedure['Procedure']['proc_title']; ?>
		</td>
		<!--<td>
			<?php echo $procedure['Procedure']['proc_scope']; ?>
		</td>
		<td>
			<?php echo $procedure['Procedure']['proc_duration']; ?>
		</td> -->
		<td>
			<?php echo $procedure['Procedure']['proc_prerequisites']; ?>
		</td>
		<td>
			<?php 
			if($procedure['Procedure']['proc_regression'] == 1){
				echo "Oui"; 
			}else{
				echo "Non";
			}
			?>
		</td>
		<td>
			<?php echo $html->link($procedure['ProcedureType']['ptype_name'], array('controller'=> 'procedure_types', 'action'=>'view', $procedure['ProcedureType']['ptype_index'])); ?>
		</td>
		<td>
			<?php echo $html->link($procedure['Phase']['phase_name'], array('controller'=> 'phases', 'action'=>'view', $procedure['Phase']['phase_index'])); ?>
		</td>
		<td>
			<?php echo $html->link($procedure['Part']['part_name'], array('controller'=> 'parts', 'action'=>'view', $procedure['Part']['part_index'])); ?>
		</td>
		<td>
			<?php echo $html->link($procedure['Version']['v_name'], array('controller'=> 'versions', 'action'=>'view', $procedure['Version']['v_name'])); ?>
		</td>
		<td>
			<?php echo $html->link($procedure['Category']['cat_name'], array('controller'=> 'categories', 'action'=>'view', $procedure['Category']['cat_index'])); ?>
		</td>
		<td class="actions">
			<?php echo $html->link('<img src="/ReqTrack/img/Voir.png" alt="Voir" title="Voir">', array('action'=>'view', $procedure['Procedure']['proc_index']), null, null, false); ?>
			<?php echo $html->link('<img src="/ReqTrack/img/Modifier.png" alt="Modifier" title="Modifier">', array('action'=>'edit', $procedure['Procedure']['proc_index']), null, null, false); ?>
			<?php echo $html->link('<img src="/ReqTrack/img/Supprimer.png" alt="Supprimer" title="Supprimer">', array('action'=>'delete', $procedure['Procedure']['proc_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $procedure['Procedure']['proc_index']), null, null, false); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('précédent', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('suivant', true).' >>', array(), null, array('class'=>'disabled'));?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Gérer '.$this->name, true), array('action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('Ajouter '.$this->name, true), array('action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('Autres actions', true), array('controller'=> 'summaries', 'action'=>'index')); ?> </li>
	</ul>
</div>
